feat: FullTextSearch request includes portion of data to be retrieved from indexer - #62903
feat: FullTextSearch request includes portion of data to be retrieved from indexer#62903madbob wants to merge 1 commit into
Conversation
… from indexer Signed-off-by: Roberto Guido <info@madbob.org>
|
Hello there, We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process. Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6 Thank you for contributing to Nextcloud and we hope to hear from you soon! (If you believe you should not receive this message, you can add yourself to the blocklist.) |
|
I close this to merge proposed changes in ongoing discussion on nextcloud/fulltextsearch#973 |
Follow-up nextcloud/fulltextsearch#960
Right now, FTS platform
fulltextsearch_elasticsearchreturns an arbitrary set of data among those stored in the index, ignoring tags, subtags, metatags and more (pun intended).It is fine to no fetch and pass everything all the time, but sometime a provider may find convenient to just reuse data already attached to a document instead of retrieve all of them from scratch.
Use case: I'm hacking a FTS provider for mail, and I have lots of structured data to index, to filter in search requests (e.g.
from:filters), and to use while displaying the response (e.g.fromcan be used to retrieve the avatar of the message sender). Retrieve all of them again from the database (or, even worse: from the IMAP server) for each search result may become a bit inefficient.Rationale of this proposal is to provide a method for the provider to specify (eventually in own implementation of
IFullTextSearchProvider::improveSearchRequest()) the list of parts required back from the platform. A mere list of strings inSearchRequest, meant to be read and handled from the platform.Sample implied implementation of changes in
SearchMappingService::generateSearchQueryParams()(here):and
SearchService::parseSearchEntry()also would require some adjustment (which I can provide myself if this is approved!).